<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Digest::SHA::PurePerl - Perl implementation of SHA-1/224/256/384/512 - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Digest-SHA-PurePerl - MetaCPAN" href="https://metacpan.org/dist/Digest-SHA-PurePerl/releases.rss" />
        <link rel="canonical" href="./Digest::SHA::PurePerl.html" />
        <meta name="description" content="Perl implementation of SHA-1/224/256/384/512" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Digest::SHA::PurePerl" />
<meta name="twitter:title"       content="Digest::SHA::PurePerl" />
<meta name="twitter:description" content="Perl implementation of SHA-1/224/256/384/512" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Digest::SHA::PurePerl.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Digest-SHA-PurePerl was released.">
      <span class="relatize">25 Feb 2023 19:08:00 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Digest-SHA-PurePerl">Digest-SHA-PurePerl</a>
  </li>
  <li>
    Module version: 6.04
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Digest-SHA-PurePerl/source/lib/Digest/SHA/PurePerl.pm">Source</a>
    (<a href="https://metacpan.org/dist/Digest-SHA-PurePerl/source/lib/Digest/SHA/PurePerl.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Digest-SHA-PurePerl/source/lib/Digest/SHA">Browse</a>
    (<a href="https://metacpan.org/dist/Digest-SHA-PurePerl/source/lib/Digest/SHA?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Digest-SHA-PurePerl/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Digest-SHA-PurePerl/contribute">How to Contribute</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Digest-SHA-PurePerl">Issues</a>
      (0)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Digest-SHA-PurePerl+6.04" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/D/Digest-SHA-PurePerl.html?oncpan=1&amp;distmat=1&amp;version=6.04&amp;grade=2" style="color: #090">177</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/D/Digest-SHA-PurePerl.html?oncpan=1&amp;distmat=1&amp;version=6.04&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/D/Digest-SHA-PurePerl.html?oncpan=1&amp;distmat=1&amp;version=6.04&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/MSHELOR/Digest-SHA-PurePerl-6.04">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Digest-SHA-PurePerl who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Digest-SHA-PurePerl-6.04/index.html">80.35% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.3.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Digest-SHA-PurePerl/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/M/MS/MSHELOR/Digest-SHA-PurePerl-6.04.tar.gz">
      Download (<span itemprop="fileSize">36.11KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FMSHELOR%2FDigest-SHA-PurePerl-6.04%2Flib%2FDigest%2FSHA%2FPurePerl.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Digest-SHA-PurePerl/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Digest-SHA-PurePerl/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Digest-SHA-PurePerl">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Digest-SHA-PurePerl">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Digest/SHA/PurePerl.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="MSHELOR/Digest-SHA-PurePerl-6.04"
>6.04
  (MSHELOR on 2023-02-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.03"
>6.03
  (MSHELOR on 2022-08-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.02"
>6.02
  (MSHELOR on 2018-04-20)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.01"
>6.01
  (MSHELOR on 2017-12-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.00"
>6.00
  (MSHELOR on 2017-12-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.98"
>5.98
  (MSHELOR on 2017-10-04)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.97"
>5.97
  (MSHELOR on 2017-09-06)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.96"
>5.96
  (MSHELOR on 2016-07-28)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.95"
>5.95
  (MSHELOR on 2015-01-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.93"
>5.93
  (MSHELOR on 2014-10-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.92"
>5.92
  (MSHELOR on 2014-06-01)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.91"
>5.91
  (MSHELOR on 2014-05-16)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.90"
>5.90
  (MSHELOR on 2014-05-07)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.89"
>5.89
  (MSHELOR on 2014-04-19)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.88"
>5.88
  (MSHELOR on 2014-03-17)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.87"
>5.87
  (MSHELOR on 2014-02-18)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.86"
>5.86
  (MSHELOR on 2014-01-30)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.85"
>5.85
  (MSHELOR on 2013-06-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.84"
>5.84
  (MSHELOR on 2013-03-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.82"
>5.82
  (MSHELOR on 2013-01-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.81"
>5.81
  (MSHELOR on 2013-01-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.80"
>5.80
  (MSHELOR on 2012-12-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.74"
>5.74
  (MSHELOR on 2012-11-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.73"
>5.73
  (MSHELOR on 2012-10-31)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.72"
>5.72
  (MSHELOR on 2012-09-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.71"
>5.71
  (MSHELOR on 2012-02-29)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.70"
>5.70
  (MSHELOR on 2011-12-14)</option>
<optgroup label="BackPAN">'
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.94"
>5.94
  (MSHELOR on 2015-01-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.83"
>5.83
  (MSHELOR on 2013-03-04)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.63"
>5.63
  (MSHELOR on 2011-11-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.62"
>5.62
  (MSHELOR on 2011-05-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.61"
>5.61
  (MSHELOR on 2011-03-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.60"
>5.60
  (MSHELOR on 2011-03-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.50"
>5.50
  (MSHELOR on 2010-12-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.49"
>5.49
  (MSHELOR on 2010-12-12)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.48"
>5.48
  (MSHELOR on 2010-01-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.47"
>5.47
  (MSHELOR on 2008-04-30)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.46"
>5.46
  (MSHELOR on 2008-04-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.45"
>5.45
  (MSHELOR on 2007-06-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.44"
>5.44
  (MSHELOR on 2006-10-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.43"
>5.43
  (MSHELOR on 2006-08-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.42"
>5.42
  (MSHELOR on 2006-07-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.41"
>5.41
  (MSHELOR on 2006-06-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.40"
>5.40
  (MSHELOR on 2006-06-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.39"
>5.39
  (MSHELOR on 2006-05-28)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.38"
>5.38
  (MSHELOR on 2006-05-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.37"
>5.37
  (MSHELOR on 2006-05-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.36"
>5.36
  (MSHELOR on 2006-05-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.35"
>5.35
  (MSHELOR on 2006-05-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.34"
>5.34
  (MSHELOR on 2006-02-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.32"
>5.32
  (MSHELOR on 2005-12-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.31"
>5.31
  (MSHELOR on 2005-09-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.30"
>5.30
  (MSHELOR on 2005-08-21)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.29"
>5.29
  (MSHELOR on 2005-08-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.28"
>5.28
  (MSHELOR on 2004-11-17)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.27"
>5.27
  (MSHELOR on 2004-10-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.26"
>5.26
  (MSHELOR on 2004-10-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.25"
>5.25
  (MSHELOR on 2004-09-13)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.24"
>5.24
  (MSHELOR on 2004-09-12)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.23"
>5.23
  (MSHELOR on 2004-09-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.22"
>5.22
  (MSHELOR on 2004-09-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.21"
>5.21
  (MSHELOR on 2004-08-23)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.20"
>5.20
  (MSHELOR on 2004-08-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.10"
>5.10
  (MSHELOR on 2004-08-06)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.06"
>0.06
  (MSHELOR on 2004-08-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.05"
>0.05
  (MSHELOR on 2004-08-01)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.04"
>0.04
  (MSHELOR on 2004-07-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.03"
>0.03
  (MSHELOR on 2004-06-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.02"
>0.02
  (MSHELOR on 2004-06-22)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.01"
>0.01
  (MSHELOR on 2004-06-17)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/MSHELOR/Digest-SHA-PurePerl-6.04/diff/' + encodeURIComponent(this.value) + '/lib/Digest/SHA/PurePerl.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="MSHELOR/Digest-SHA-PurePerl-6.04"
>6.04
  (MSHELOR on 2023-02-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.03"
>6.03
  (MSHELOR on 2022-08-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.02"
>6.02
  (MSHELOR on 2018-04-20)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.01"
>6.01
  (MSHELOR on 2017-12-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.00"
>6.00
  (MSHELOR on 2017-12-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.98"
>5.98
  (MSHELOR on 2017-10-04)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.97"
>5.97
  (MSHELOR on 2017-09-06)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.96"
>5.96
  (MSHELOR on 2016-07-28)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.95"
>5.95
  (MSHELOR on 2015-01-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.93"
>5.93
  (MSHELOR on 2014-10-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.92"
>5.92
  (MSHELOR on 2014-06-01)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.91"
>5.91
  (MSHELOR on 2014-05-16)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.90"
>5.90
  (MSHELOR on 2014-05-07)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.89"
>5.89
  (MSHELOR on 2014-04-19)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.88"
>5.88
  (MSHELOR on 2014-03-17)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.87"
>5.87
  (MSHELOR on 2014-02-18)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.86"
>5.86
  (MSHELOR on 2014-01-30)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.85"
>5.85
  (MSHELOR on 2013-06-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.84"
>5.84
  (MSHELOR on 2013-03-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.82"
>5.82
  (MSHELOR on 2013-01-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.81"
>5.81
  (MSHELOR on 2013-01-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.80"
>5.80
  (MSHELOR on 2012-12-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.74"
>5.74
  (MSHELOR on 2012-11-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.73"
>5.73
  (MSHELOR on 2012-10-31)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.72"
>5.72
  (MSHELOR on 2012-09-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.71"
>5.71
  (MSHELOR on 2012-02-29)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.70"
>5.70
  (MSHELOR on 2011-12-14)</option>
<optgroup label="BackPAN">'
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.94"
>5.94
  (MSHELOR on 2015-01-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.83"
>5.83
  (MSHELOR on 2013-03-04)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.63"
>5.63
  (MSHELOR on 2011-11-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.62"
>5.62
  (MSHELOR on 2011-05-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.61"
>5.61
  (MSHELOR on 2011-03-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.60"
>5.60
  (MSHELOR on 2011-03-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.50"
>5.50
  (MSHELOR on 2010-12-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.49"
>5.49
  (MSHELOR on 2010-12-12)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.48"
>5.48
  (MSHELOR on 2010-01-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.47"
>5.47
  (MSHELOR on 2008-04-30)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.46"
>5.46
  (MSHELOR on 2008-04-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.45"
>5.45
  (MSHELOR on 2007-06-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.44"
>5.44
  (MSHELOR on 2006-10-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.43"
>5.43
  (MSHELOR on 2006-08-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.42"
>5.42
  (MSHELOR on 2006-07-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.41"
>5.41
  (MSHELOR on 2006-06-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.40"
>5.40
  (MSHELOR on 2006-06-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.39"
>5.39
  (MSHELOR on 2006-05-28)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.38"
>5.38
  (MSHELOR on 2006-05-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.37"
>5.37
  (MSHELOR on 2006-05-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.36"
>5.36
  (MSHELOR on 2006-05-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.35"
>5.35
  (MSHELOR on 2006-05-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.34"
>5.34
  (MSHELOR on 2006-02-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.32"
>5.32
  (MSHELOR on 2005-12-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.31"
>5.31
  (MSHELOR on 2005-09-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.30"
>5.30
  (MSHELOR on 2005-08-21)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.29"
>5.29
  (MSHELOR on 2005-08-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.28"
>5.28
  (MSHELOR on 2004-11-17)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.27"
>5.27
  (MSHELOR on 2004-10-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.26"
>5.26
  (MSHELOR on 2004-10-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.25"
>5.25
  (MSHELOR on 2004-09-13)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.24"
>5.24
  (MSHELOR on 2004-09-12)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.23"
>5.23
  (MSHELOR on 2004-09-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.22"
>5.22
  (MSHELOR on 2004-09-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.21"
>5.21
  (MSHELOR on 2004-08-23)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.20"
>5.20
  (MSHELOR on 2004-08-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.10"
>5.10
  (MSHELOR on 2004-08-06)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.06"
>0.06
  (MSHELOR on 2004-08-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.05"
>0.05
  (MSHELOR on 2004-08-01)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.04"
>0.04
  (MSHELOR on 2004-07-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.03"
>0.03
  (MSHELOR on 2004-06-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.02"
>0.02
  (MSHELOR on 2004-06-22)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.01"
>0.01
  (MSHELOR on 2004-06-17)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/FileHandle" title="FileHandle" class="ellipsis">FileHandle</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Digest::SHA::PurePerl/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Digest%3A%3ASHA%3A%3APurePerl">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Digest-SHA-PurePerl">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/MSHELOR/Digest-SHA-PurePerl-6.04/view/lib/Digest/SHA/PurePerl.pm">This version</a>
    </li>
    <li>
      <a href="./Digest::SHA::PurePerl.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/MICHIELB"><img src="https://www.gravatar.com/avatar/c35b97da3835376f2d804b022121f962?d=identicon&amp;s=20" title="MICHIELB" alt="MICHIELB"></a>
<a class="display-all" href="https://metacpan.org/author/KEEDI"><img src="https://www.gravatar.com/avatar/95f905a7a4ccc573c711e9d264c0fde8?d=identicon&amp;s=20" title="KEEDI" alt="KEEDI"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Digest-SHA-PurePerl/plussers">2 PAUSE users</a>
</div>
<div>
    1 non-PAUSE user
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
    >
      Mark Shelor, mshelor@cpan.org
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/MSHELOR" class="author-name">Mark Shelor</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Digest/SHA/PurePerl.pm&#39;" class="">
<option
  selected
  value="MSHELOR/Digest-SHA-PurePerl-6.04"
>6.04
  (MSHELOR on 2023-02-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.03"
>6.03
  (MSHELOR on 2022-08-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.02"
>6.02
  (MSHELOR on 2018-04-20)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.01"
>6.01
  (MSHELOR on 2017-12-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-6.00"
>6.00
  (MSHELOR on 2017-12-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.98"
>5.98
  (MSHELOR on 2017-10-04)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.97"
>5.97
  (MSHELOR on 2017-09-06)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.96"
>5.96
  (MSHELOR on 2016-07-28)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.95"
>5.95
  (MSHELOR on 2015-01-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.93"
>5.93
  (MSHELOR on 2014-10-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.92"
>5.92
  (MSHELOR on 2014-06-01)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.91"
>5.91
  (MSHELOR on 2014-05-16)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.90"
>5.90
  (MSHELOR on 2014-05-07)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.89"
>5.89
  (MSHELOR on 2014-04-19)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.88"
>5.88
  (MSHELOR on 2014-03-17)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.87"
>5.87
  (MSHELOR on 2014-02-18)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.86"
>5.86
  (MSHELOR on 2014-01-30)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.85"
>5.85
  (MSHELOR on 2013-06-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.84"
>5.84
  (MSHELOR on 2013-03-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.82"
>5.82
  (MSHELOR on 2013-01-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.81"
>5.81
  (MSHELOR on 2013-01-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.80"
>5.80
  (MSHELOR on 2012-12-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.74"
>5.74
  (MSHELOR on 2012-11-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.73"
>5.73
  (MSHELOR on 2012-10-31)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.72"
>5.72
  (MSHELOR on 2012-09-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.71"
>5.71
  (MSHELOR on 2012-02-29)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.70"
>5.70
  (MSHELOR on 2011-12-14)</option>
<optgroup label="BackPAN">'
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.94"
>5.94
  (MSHELOR on 2015-01-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.83"
>5.83
  (MSHELOR on 2013-03-04)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.63"
>5.63
  (MSHELOR on 2011-11-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.62"
>5.62
  (MSHELOR on 2011-05-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.61"
>5.61
  (MSHELOR on 2011-03-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.60"
>5.60
  (MSHELOR on 2011-03-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.50"
>5.50
  (MSHELOR on 2010-12-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.49"
>5.49
  (MSHELOR on 2010-12-12)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.48"
>5.48
  (MSHELOR on 2010-01-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.47"
>5.47
  (MSHELOR on 2008-04-30)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.46"
>5.46
  (MSHELOR on 2008-04-09)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.45"
>5.45
  (MSHELOR on 2007-06-26)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.44"
>5.44
  (MSHELOR on 2006-10-14)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.43"
>5.43
  (MSHELOR on 2006-08-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.42"
>5.42
  (MSHELOR on 2006-07-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.41"
>5.41
  (MSHELOR on 2006-06-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.40"
>5.40
  (MSHELOR on 2006-06-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.39"
>5.39
  (MSHELOR on 2006-05-28)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.38"
>5.38
  (MSHELOR on 2006-05-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.37"
>5.37
  (MSHELOR on 2006-05-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.36"
>5.36
  (MSHELOR on 2006-05-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.35"
>5.35
  (MSHELOR on 2006-05-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.34"
>5.34
  (MSHELOR on 2006-02-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.32"
>5.32
  (MSHELOR on 2005-12-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.31"
>5.31
  (MSHELOR on 2005-09-05)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.30"
>5.30
  (MSHELOR on 2005-08-21)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.29"
>5.29
  (MSHELOR on 2005-08-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.28"
>5.28
  (MSHELOR on 2004-11-17)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.27"
>5.27
  (MSHELOR on 2004-10-24)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.26"
>5.26
  (MSHELOR on 2004-10-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.25"
>5.25
  (MSHELOR on 2004-09-13)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.24"
>5.24
  (MSHELOR on 2004-09-12)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.23"
>5.23
  (MSHELOR on 2004-09-10)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.22"
>5.22
  (MSHELOR on 2004-09-08)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.21"
>5.21
  (MSHELOR on 2004-08-23)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.20"
>5.20
  (MSHELOR on 2004-08-15)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-5.10"
>5.10
  (MSHELOR on 2004-08-06)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.06"
>0.06
  (MSHELOR on 2004-08-03)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.05"
>0.05
  (MSHELOR on 2004-08-01)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.04"
>0.04
  (MSHELOR on 2004-07-02)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.03"
>0.03
  (MSHELOR on 2004-06-25)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.02"
>0.02
  (MSHELOR on 2004-06-22)</option>
<option
  
  value="MSHELOR/Digest-SHA-PurePerl-0.01"
>0.01
  (MSHELOR on 2004-06-17)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Digest-SHA-PurePerl">Digest-SHA-PurePerl-6.04</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage one &#10;
          • 2 direct dependents &#10;          • 2 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="10"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Digest-SHA-PurePerl-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Digest-SHA-PurePerl-6.04">
    <input type="hidden" name="author" value="MSHELOR">
    <input type="hidden" name="distribution" value="Digest-SHA-PurePerl">
    <button type="submit" class="favorite highlight"><span>3</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Digest::SHA::PurePerl.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>3</span> ++</a>
</div>
   / <span>Digest::SHA::PurePerl</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Digest::SHA::PurePerl.html#NAME">NAME</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#SYNOPSIS-(HMAC-SHA)">SYNOPSIS (HMAC-SHA)</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#ABSTRACT">ABSTRACT</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#UNICODE-AND-SIDE-EFFECTS">UNICODE AND SIDE EFFECTS</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#NIST-STATEMENT-ON-SHA-1">NIST STATEMENT ON SHA-1</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#PADDING-OF-BASE64-DIGESTS">PADDING OF BASE64 DIGESTS</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#EXPORT">EXPORT</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#EXPORTABLE-FUNCTIONS">EXPORTABLE FUNCTIONS</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#SEE-ALSO">SEE ALSO</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#ACKNOWLEDGMENTS">ACKNOWLEDGMENTS</a></li>
  <li><a href="./Digest::SHA::PurePerl.html#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Digest::SHA::PurePerl - Perl implementation of SHA-1/224/256/384/512</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<p>In programs:</p>

<pre><code>                # Functional interface

        use Digest::SHA::PurePerl qw(sha1 sha1_hex sha1_base64 ...);

        $digest = sha1($data);
        $digest = sha1_hex($data);
        $digest = sha1_base64($data);

        $digest = sha256($data);
        $digest = sha384_hex($data);
        $digest = sha512_base64($data);

                # Object-oriented

        use Digest::SHA::PurePerl;

        $sha = Digest::SHA::PurePerl-&gt;new($alg);

        $sha-&gt;add($data);               # feed data into stream

        $sha-&gt;addfile(*F);
        $sha-&gt;addfile($filename);

        $sha-&gt;add_bits($bits);
        $sha-&gt;add_bits($data, $nbits);

        $sha_copy = $sha-&gt;clone;        # make copy of digest object
        $state = $sha-&gt;getstate;        # save current state to string
        $sha-&gt;putstate($state);         # restore previous $state

        $digest = $sha-&gt;digest;         # compute digest
        $digest = $sha-&gt;hexdigest;
        $digest = $sha-&gt;b64digest;</code></pre>

<p>From the command line:</p>

<pre><code>        $ shasumpp files

        $ shasumpp --help</code></pre>

<h1 id="SYNOPSIS-(HMAC-SHA)"><a id="SYNOPSIS1"></a><a id="SYNOPSIS--HMAC-SHA"></a>SYNOPSIS (HMAC-SHA)</h1>

<pre><code>                # Functional interface only

        use Digest::SHA::PurePerl qw(hmac_sha1 hmac_sha1_hex ...);

        $digest = hmac_sha1($data, $key);
        $digest = hmac_sha224_hex($data, $key);
        $digest = hmac_sha256_base64($data, $key);</code></pre>

<h1 id="ABSTRACT">ABSTRACT</h1>

<p>Digest::SHA::PurePerl is a complete implementation of the NIST Secure Hash Standard. It gives Perl programmers a convenient way to calculate SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256 message digests. The module can handle all types of input, including partial-byte data.</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>Digest::SHA::PurePerl is written entirely in Perl. If your platform has a C compiler, you should install the functionally equivalent (but much faster) <a href="https://metacpan.org/pod/Digest::SHA">Digest::SHA</a> module.</p>

<p>The programming interface is easy to use: it&#39;s the same one found in CPAN&#39;s <a href="https://metacpan.org/pod/Digest">Digest</a> module. So, if your applications currently use <a href="https://metacpan.org/pod/Digest::MD5">Digest::MD5</a> and you&#39;d prefer the stronger security of SHA, it&#39;s a simple matter to convert them.</p>

<p>The interface provides two ways to calculate digests: all-at-once, or in stages. To illustrate, the following short program computes the SHA-256 digest of &quot;hello world&quot; using each approach:</p>

<pre><code>        use Digest::SHA::PurePerl qw(sha256_hex);

        $data = &quot;hello world&quot;;
        @frags = split(//, $data);

        # all-at-once (Functional style)
        $digest1 = sha256_hex($data);

        # in-stages (OOP style)
        $state = Digest::SHA::PurePerl-&gt;new(256);
        for (@frags) { $state-&gt;add($_) }
        $digest2 = $state-&gt;hexdigest;

        print $digest1 eq $digest2 ?
                &quot;whew!\n&quot; : &quot;oops!\n&quot;;</code></pre>

<p>To calculate the digest of an n-bit message where <i>n</i> is not a multiple of 8, use the <i>add_bits()</i> method. For example, consider the 446-bit message consisting of the bit-string &quot;110&quot; repeated 148 times, followed by &quot;11&quot;. Here&#39;s how to display its SHA-1 digest:</p>

<pre><code>        use Digest::SHA::PurePerl;
        $bits = &quot;110&quot; x 148 . &quot;11&quot;;
        $sha = Digest::SHA::PurePerl-&gt;new(1)-&gt;add_bits($bits);
        print $sha-&gt;hexdigest, &quot;\n&quot;;</code></pre>

<p>Note that for larger bit-strings, it&#39;s more efficient to use the two-argument version <i>add_bits($data, $nbits)</i>, where <i>$data</i> is in the customary packed binary format used for Perl strings.</p>

<p>The module also lets you save intermediate SHA states to a string. The <i>getstate()</i> method generates portable, human-readable text describing the current state of computation. You can subsequently restore that state with <i>putstate()</i> to resume where the calculation left off.</p>

<p>To see what a state description looks like, just run the following:</p>

<pre><code>        use Digest::SHA::PurePerl;
        print Digest::SHA::PurePerl-&gt;new-&gt;add(&quot;Shaw&quot; x 1962)-&gt;getstate;</code></pre>

<p>As an added convenience, the Digest::SHA::PurePerl module offers routines to calculate keyed hashes using the HMAC-SHA-1/224/256/384/512 algorithms. These services exist in functional form only, and mimic the style and behavior of the <i>sha()</i>, <i>sha_hex()</i>, and <i>sha_base64()</i> functions.</p>

<pre><code>        # Test vector from draft-ietf-ipsec-ciph-sha-256-01.txt

        use Digest::SHA::PurePerl qw(hmac_sha256_hex);
        print hmac_sha256_hex(&quot;Hi There&quot;, chr(0x0b) x 32), &quot;\n&quot;;</code></pre>

<h1 id="UNICODE-AND-SIDE-EFFECTS"><a id="UNICODE"></a>UNICODE AND SIDE EFFECTS</h1>

<p>Perl supports Unicode strings as of version 5.6. Such strings may contain wide characters, namely, characters whose ordinal values are greater than 255. This can cause problems for digest algorithms such as SHA that are specified to operate on sequences of bytes.</p>

<p>The rule by which Digest::SHA::PurePerl handles a Unicode string is easy to state, but potentially confusing to grasp: the string is interpreted as a sequence of byte values, where each byte value is equal to the ordinal value (viz. code point) of its corresponding Unicode character. That way, the Unicode string &#39;abc&#39; has exactly the same digest value as the ordinary string &#39;abc&#39;.</p>

<p>Since a wide character does not fit into a byte, the Digest::SHA::PurePerl routines croak if they encounter one. Whereas if a Unicode string contains no wide characters, the module accepts it quite happily. The following code illustrates the two cases:</p>

<pre><code>        $str1 = pack(&#39;U*&#39;, (0..255));
        print sha1_hex($str1);          # ok

        $str2 = pack(&#39;U*&#39;, (0..256));
        print sha1_hex($str2);          # croaks</code></pre>

<p>Be aware that the digest routines silently convert UTF-8 input into its equivalent byte sequence in the native encoding (cf. utf8::downgrade). This side effect influences only the way Perl stores the data internally, but otherwise leaves the actual value of the data intact.</p>

<h1 id="NIST-STATEMENT-ON-SHA-1"><a id="NIST"></a>NIST STATEMENT ON SHA-1</h1>

<p>NIST acknowledges that the work of Prof. Xiaoyun Wang constitutes a practical collision attack on SHA-1. Therefore, NIST encourages the rapid adoption of the SHA-2 hash functions (e.g. SHA-256) for applications requiring strong collision resistance, such as digital signatures.</p>

<p>ref. <a href="http://csrc.nist.gov/groups/ST/hash/statement.html">http://csrc.nist.gov/groups/ST/hash/statement.html</a></p>

<h1 id="PADDING-OF-BASE64-DIGESTS"><a id="PADDING"></a>PADDING OF BASE64 DIGESTS</h1>

<p>By convention, CPAN Digest modules do <b>not</b> pad their Base64 output. Problems can occur when feeding such digests to other software that expects properly padded Base64 encodings.</p>

<p>For the time being, any necessary padding must be done by the user. Fortunately, this is a simple operation: if the length of a Base64-encoded digest isn&#39;t a multiple of 4, simply append &quot;=&quot; characters to the end of the digest until it is:</p>

<pre><code>        while (length($b64_digest) % 4) {
                $b64_digest .= &#39;=&#39;;
        }</code></pre>

<p>To illustrate, <i>sha256_base64(&quot;abc&quot;)</i> is computed to be</p>

<pre><code>        ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0</code></pre>

<p>which has a length of 43. So, the properly padded version is</p>

<pre><code>        ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=</code></pre>

<h1 id="EXPORT">EXPORT</h1>

<p>None by default.</p>

<h1 id="EXPORTABLE-FUNCTIONS"><a id="EXPORTABLE"></a>EXPORTABLE FUNCTIONS</h1>

<p>Provided your Perl installation supports 64-bit integers, all of these functions will be available for use. Otherwise, you won&#39;t be able to perform the SHA-384 and SHA-512 transforms, both of which require 64-bit operations.</p>

<p><i>Functional style</i></p>

<dl>

<dt id="sha1($data,-...)"><a id="sha1"></a><a id="sha1-data"></a><b>sha1($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha224($data,-...)"><a id="sha224"></a><a id="sha224-data"></a><b>sha224($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha256($data,-...)"><a id="sha256"></a><a id="sha256-data"></a><b>sha256($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha384($data,-...)"><a id="sha384"></a><a id="sha384-data"></a><b>sha384($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512($data,-...)"><a id="sha512"></a><a id="sha512-data"></a><b>sha512($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512224($data,-...)"><a id="sha512224"></a><a id="sha512224-data"></a><b>sha512224($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512256($data,-...)"><a id="sha512256"></a><a id="sha512256-data"></a><b>sha512256($data, ...)</b></dt>
<dd>

<p>Logically joins the arguments into a single string, and returns its SHA-1/224/256/384/512 digest encoded as a binary string.</p>

</dd>
<dt id="sha1_hex($data,-...)"><a id="sha1_hex"></a><a id="sha1_hex-data"></a><b>sha1_hex($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha224_hex($data,-...)"><a id="sha224_hex"></a><a id="sha224_hex-data"></a><b>sha224_hex($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha256_hex($data,-...)"><a id="sha256_hex"></a><a id="sha256_hex-data"></a><b>sha256_hex($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha384_hex($data,-...)"><a id="sha384_hex"></a><a id="sha384_hex-data"></a><b>sha384_hex($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512_hex($data,-...)"><a id="sha512_hex"></a><a id="sha512_hex-data"></a><b>sha512_hex($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512224_hex($data,-...)"><a id="sha512224_hex"></a><a id="sha512224_hex-data"></a><b>sha512224_hex($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512256_hex($data,-...)"><a id="sha512256_hex"></a><a id="sha512256_hex-data"></a><b>sha512256_hex($data, ...)</b></dt>
<dd>

<p>Logically joins the arguments into a single string, and returns its SHA-1/224/256/384/512 digest encoded as a hexadecimal string.</p>

</dd>
<dt id="sha1_base64($data,-...)"><a id="sha1_base64"></a><a id="sha1_base64-data"></a><b>sha1_base64($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha224_base64($data,-...)"><a id="sha224_base64"></a><a id="sha224_base64-data"></a><b>sha224_base64($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha256_base64($data,-...)"><a id="sha256_base64"></a><a id="sha256_base64-data"></a><b>sha256_base64($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha384_base64($data,-...)"><a id="sha384_base64"></a><a id="sha384_base64-data"></a><b>sha384_base64($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512_base64($data,-...)"><a id="sha512_base64"></a><a id="sha512_base64-data"></a><b>sha512_base64($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512224_base64($data,-...)"><a id="sha512224_base64"></a><a id="sha512224_base64-data"></a><b>sha512224_base64($data, ...)</b></dt>
<dd>

</dd>
<dt id="sha512256_base64($data,-...)"><a id="sha512256_base64"></a><a id="sha512256_base64-data"></a><b>sha512256_base64($data, ...)</b></dt>
<dd>

<p>Logically joins the arguments into a single string, and returns its SHA-1/224/256/384/512 digest encoded as a Base64 string.</p>

<p>It&#39;s important to note that the resulting string does <b>not</b> contain the padding characters typical of Base64 encodings. This omission is deliberate, and is done to maintain compatibility with the family of CPAN Digest modules. See <a href="./Digest::SHA::PurePerl.html#PADDING-OF-BASE64-DIGESTS">&quot;PADDING OF BASE64 DIGESTS&quot;</a> for details.</p>

</dd>
</dl>

<p><i>OOP style</i></p>

<dl>

<dt id="new($alg)"><a id="new"></a><a id="new-alg"></a><b>new($alg)</b></dt>
<dd>

<p>Returns a new Digest::SHA::PurePerl object. Allowed values for <i>$alg</i> are 1, 224, 256, 384, 512, 512224, or 512256. It&#39;s also possible to use common string representations of the algorithm (e.g. &quot;sha256&quot;, &quot;SHA-384&quot;). If the argument is missing, SHA-1 will be used by default.</p>

<p>Invoking <i>new</i> as an instance method will reset the object to the initial state associated with <i>$alg</i>. If the argument is missing, the object will continue using the same algorithm that was selected at creation.</p>

</dd>
<dt id="reset($alg)"><a id="reset"></a><a id="reset-alg"></a><b>reset($alg)</b></dt>
<dd>

<p>This method has exactly the same effect as <i>new($alg)</i>. In fact, <i>reset</i> is just an alias for <i>new</i>.</p>

</dd>
<dt id="hashsize"><b>hashsize</b></dt>
<dd>

<p>Returns the number of digest bits for this object. The values are 160, 224, 256, 384, 512, 224, and 256 for SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256, respectively.</p>

</dd>
<dt id="algorithm"><b>algorithm</b></dt>
<dd>

<p>Returns the digest algorithm for this object. The values are 1, 224, 256, 384, 512, 512224, and 512256 for SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256, respectively.</p>

</dd>
<dt id="clone"><b>clone</b></dt>
<dd>

<p>Returns a duplicate copy of the object.</p>

</dd>
<dt id="add($data,-...)"><a id="add"></a><a id="add-data"></a><b>add($data, ...)</b></dt>
<dd>

<p>Logically joins the arguments into a single string, and uses it to update the current digest state. In other words, the following statements have the same effect:</p>

<pre><code>        $sha-&gt;add(&quot;a&quot;); $sha-&gt;add(&quot;b&quot;); $sha-&gt;add(&quot;c&quot;);
        $sha-&gt;add(&quot;a&quot;)-&gt;add(&quot;b&quot;)-&gt;add(&quot;c&quot;);
        $sha-&gt;add(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;);
        $sha-&gt;add(&quot;abc&quot;);</code></pre>

<p>The return value is the updated object itself.</p>

</dd>
<dt id="add_bits($data,-$nbits)"><a id="add_bits"></a><a id="add_bits-data---nbits"></a><b>add_bits($data, $nbits)</b></dt>
<dd>

</dd>
<dt id="add_bits($bits)"><a id="add_bits1"></a><a id="add_bits-bits"></a><b>add_bits($bits)</b></dt>
<dd>

<p>Updates the current digest state by appending bits to it. The return value is the updated object itself.</p>

<p>The first form causes the most-significant <i>$nbits</i> of <i>$data</i> to be appended to the stream. The <i>$data</i> argument is in the customary binary format used for Perl strings.</p>

<p>The second form takes an ASCII string of &quot;0&quot; and &quot;1&quot; characters as its argument. It&#39;s equivalent to</p>

<pre><code>        $sha-&gt;add_bits(pack(&quot;B*&quot;, $bits), length($bits));</code></pre>

<p>So, the following two statements do the same thing:</p>

<pre><code>        $sha-&gt;add_bits(&quot;111100001010&quot;);
        $sha-&gt;add_bits(&quot;\xF0\xA0&quot;, 12);</code></pre>

</dd>
<dt id="addfile(*FILE)"><a id="addfile"></a><a id="addfile-FILE"></a><b>addfile(*FILE)</b></dt>
<dd>

<p>Reads from <i>FILE</i> until EOF, and appends that data to the current state. The return value is the updated object itself.</p>

</dd>
<dt id="addfile($filename-[,-$mode])"><a id="addfile1"></a><a id="addfile-filename----mode"></a><b>addfile($filename [, $mode])</b></dt>
<dd>

<p>Reads the contents of <i>$filename</i>, and appends that data to the current state. The return value is the updated object itself.</p>

<p>By default, <i>$filename</i> is simply opened and read; no special modes or I/O disciplines are used. To change this, set the optional <i>$mode</i> argument to one of the following values:</p>

<pre><code>        &quot;b&quot;     read file in binary mode

        &quot;U&quot;     use universal newlines

        &quot;0&quot;     use BITS mode</code></pre>

<p>The &quot;U&quot; mode is modeled on Python&#39;s &quot;Universal Newlines&quot; concept, whereby DOS and Mac OS line terminators are converted internally to UNIX newlines before processing. This ensures consistent digest values when working simultaneously across multiple file systems. <b>The &quot;U&quot; mode influences only text files</b>, namely those passing Perl&#39;s <i>-T</i> test; binary files are processed with no translation whatsoever.</p>

<p>The BITS mode (&quot;0&quot;) interprets the contents of <i>$filename</i> as a logical stream of bits, where each ASCII &#39;0&#39; or &#39;1&#39; character represents a 0 or 1 bit, respectively. All other characters are ignored. This provides a convenient way to calculate the digest values of partial-byte data by using files, rather than having to write separate programs employing the <i>add_bits</i> method.</p>

</dd>
<dt id="getstate"><b>getstate</b></dt>
<dd>

<p>Returns a string containing a portable, human-readable representation of the current SHA state.</p>

</dd>
<dt id="putstate($str)"><a id="putstate"></a><a id="putstate-str"></a><b>putstate($str)</b></dt>
<dd>

<p>Returns a Digest::SHA object representing the SHA state contained in <i>$str</i>. The format of <i>$str</i> matches the format of the output produced by method <i>getstate</i>. If called as a class method, a new object is created; if called as an instance method, the object is reset to the state contained in <i>$str</i>.</p>

</dd>
<dt id="dump($filename)"><a id="dump"></a><a id="dump-filename"></a><b>dump($filename)</b></dt>
<dd>

<p>Writes the output of <i>getstate</i> to <i>$filename</i>. If the argument is missing, or equal to the empty string, the state information will be written to STDOUT.</p>

</dd>
<dt id="load($filename)"><a id="load"></a><a id="load-filename"></a><b>load($filename)</b></dt>
<dd>

<p>Returns a Digest::SHA object that results from calling <i>putstate</i> on the contents of <i>$filename</i>. If the argument is missing, or equal to the empty string, the state information will be read from STDIN.</p>

</dd>
<dt id="digest"><b>digest</b></dt>
<dd>

<p>Returns the digest encoded as a binary string.</p>

<p>Note that the <i>digest</i> method is a read-once operation. Once it has been performed, the Digest::SHA::PurePerl object is automatically reset in preparation for calculating another digest value. Call <i>$sha-&gt;clone-&gt;digest</i> if it&#39;s necessary to preserve the original digest state.</p>

</dd>
<dt id="hexdigest"><b>hexdigest</b></dt>
<dd>

<p>Returns the digest encoded as a hexadecimal string.</p>

<p>Like <i>digest</i>, this method is a read-once operation. Call <i>$sha-&gt;clone-&gt;hexdigest</i> if it&#39;s necessary to preserve the original digest state.</p>

</dd>
<dt id="b64digest"><b>b64digest</b></dt>
<dd>

<p>Returns the digest encoded as a Base64 string.</p>

<p>Like <i>digest</i>, this method is a read-once operation. Call <i>$sha-&gt;clone-&gt;b64digest</i> if it&#39;s necessary to preserve the original digest state.</p>

<p>It&#39;s important to note that the resulting string does <b>not</b> contain the padding characters typical of Base64 encodings. This omission is deliberate, and is done to maintain compatibility with the family of CPAN Digest modules. See <a href="./Digest::SHA::PurePerl.html#PADDING-OF-BASE64-DIGESTS">&quot;PADDING OF BASE64 DIGESTS&quot;</a> for details.</p>

</dd>
</dl>

<p><i>HMAC-SHA-1/224/256/384/512</i></p>

<dl>

<dt id="hmac_sha1($data,-$key)"><a id="hmac_sha1"></a><a id="hmac_sha1-data---key"></a><b>hmac_sha1($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha224($data,-$key)"><a id="hmac_sha224"></a><a id="hmac_sha224-data---key"></a><b>hmac_sha224($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha256($data,-$key)"><a id="hmac_sha256"></a><a id="hmac_sha256-data---key"></a><b>hmac_sha256($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha384($data,-$key)"><a id="hmac_sha384"></a><a id="hmac_sha384-data---key"></a><b>hmac_sha384($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512($data,-$key)"><a id="hmac_sha512"></a><a id="hmac_sha512-data---key"></a><b>hmac_sha512($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512224($data,-$key)"><a id="hmac_sha512224"></a><a id="hmac_sha512224-data---key"></a><b>hmac_sha512224($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512256($data,-$key)"><a id="hmac_sha512256"></a><a id="hmac_sha512256-data---key"></a><b>hmac_sha512256($data, $key)</b></dt>
<dd>

<p>Returns the HMAC-SHA-1/224/256/384/512 digest of <i>$data</i>/<i>$key</i>, with the result encoded as a binary string. Multiple <i>$data</i> arguments are allowed, provided that <i>$key</i> is the last argument in the list.</p>

</dd>
<dt id="hmac_sha1_hex($data,-$key)"><a id="hmac_sha1_hex"></a><a id="hmac_sha1_hex-data---key"></a><b>hmac_sha1_hex($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha224_hex($data,-$key)"><a id="hmac_sha224_hex"></a><a id="hmac_sha224_hex-data---key"></a><b>hmac_sha224_hex($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha256_hex($data,-$key)"><a id="hmac_sha256_hex"></a><a id="hmac_sha256_hex-data---key"></a><b>hmac_sha256_hex($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha384_hex($data,-$key)"><a id="hmac_sha384_hex"></a><a id="hmac_sha384_hex-data---key"></a><b>hmac_sha384_hex($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512_hex($data,-$key)"><a id="hmac_sha512_hex"></a><a id="hmac_sha512_hex-data---key"></a><b>hmac_sha512_hex($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512224_hex($data,-$key)"><a id="hmac_sha512224_hex"></a><a id="hmac_sha512224_hex-data---key"></a><b>hmac_sha512224_hex($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512256_hex($data,-$key)"><a id="hmac_sha512256_hex"></a><a id="hmac_sha512256_hex-data---key"></a><b>hmac_sha512256_hex($data, $key)</b></dt>
<dd>

<p>Returns the HMAC-SHA-1/224/256/384/512 digest of <i>$data</i>/<i>$key</i>, with the result encoded as a hexadecimal string. Multiple <i>$data</i> arguments are allowed, provided that <i>$key</i> is the last argument in the list.</p>

</dd>
<dt id="hmac_sha1_base64($data,-$key)"><a id="hmac_sha1_base64"></a><a id="hmac_sha1_base64-data---key"></a><b>hmac_sha1_base64($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha224_base64($data,-$key)"><a id="hmac_sha224_base64"></a><a id="hmac_sha224_base64-data---key"></a><b>hmac_sha224_base64($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha256_base64($data,-$key)"><a id="hmac_sha256_base64"></a><a id="hmac_sha256_base64-data---key"></a><b>hmac_sha256_base64($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha384_base64($data,-$key)"><a id="hmac_sha384_base64"></a><a id="hmac_sha384_base64-data---key"></a><b>hmac_sha384_base64($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512_base64($data,-$key)"><a id="hmac_sha512_base64"></a><a id="hmac_sha512_base64-data---key"></a><b>hmac_sha512_base64($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512224_base64($data,-$key)"><a id="hmac_sha512224_base64"></a><a id="hmac_sha512224_base64-data---key"></a><b>hmac_sha512224_base64($data, $key)</b></dt>
<dd>

</dd>
<dt id="hmac_sha512256_base64($data,-$key)"><a id="hmac_sha512256_base64"></a><a id="hmac_sha512256_base64-data---key"></a><b>hmac_sha512256_base64($data, $key)</b></dt>
<dd>

<p>Returns the HMAC-SHA-1/224/256/384/512 digest of <i>$data</i>/<i>$key</i>, with the result encoded as a Base64 string. Multiple <i>$data</i> arguments are allowed, provided that <i>$key</i> is the last argument in the list.</p>

<p>It&#39;s important to note that the resulting string does <b>not</b> contain the padding characters typical of Base64 encodings. This omission is deliberate, and is done to maintain compatibility with the family of CPAN Digest modules. See <a href="./Digest::SHA::PurePerl.html#PADDING-OF-BASE64-DIGESTS">&quot;PADDING OF BASE64 DIGESTS&quot;</a> for details.</p>

</dd>
</dl>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<p><a href="https://metacpan.org/pod/Digest">Digest</a>, <a href="https://metacpan.org/pod/Digest::SHA">Digest::SHA</a></p>

<p>The Secure Hash Standard (Draft FIPS PUB 180-4) can be found at:</p>

<p><a href="http://csrc.nist.gov/publications/drafts/fips180-4/Draft-FIPS180-4_Feb2011.pdf">http://csrc.nist.gov/publications/drafts/fips180-4/Draft-FIPS180-4_Feb2011.pdf</a></p>

<p>The Keyed-Hash Message Authentication Code (HMAC):</p>

<p><a href="http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf">http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf</a></p>

<h1 id="AUTHOR">AUTHOR</h1>

<pre><code>        Mark Shelor     &lt;mshelor@cpan.org&gt;</code></pre>

<h1 id="ACKNOWLEDGMENTS">ACKNOWLEDGMENTS</h1>

<p>The author is particularly grateful to</p>

<pre><code>        Gisle Aas
        Sean Burke
        Chris Carey
        Alexandr Ciornii
        Chris David
        Jim Doble
        Thomas Drugeon
        Julius Duque
        Jeffrey Friedl
        Robert Gilmour
        Brian Gladman
        Adam Kennedy
        Mark Lawrence
        Andy Lester
        Alex Muntada
        Steve Peters
        Chris Skiscim
        Martin Thurn
        Gunnar Wolf
        Adam Woodbury</code></pre>

<p>&quot;A candle in the bar was lighting up the dirty windows, on one of which was a notice, in white enamel letters, telling customers they could bring their own food: ON PEUT APPORTER SON MANGER, from which the M and the last R were missing.&quot; - Maigret&#39;s War of Nerves</p>

<h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1>

<p>Copyright (C) 2003-2023 Mark Shelor</p>

<p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p>

<p><a href="https://metacpan.org/pod/perlartistic">perlartistic</a></p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Digest::SHA::PurePerl, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Digest::SHA::PurePerl</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Digest::SHA::PurePerl</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Digest::SHA::PurePerl.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
